import service from '@/utils/request'

export const getMenuList = (params) => {
    return service({
        url: '/menu/page',
        method: 'get',
        params
    })
}


export const addMenu = (data) => {
    return service({
        url: '/menu/save',
        method: 'post',
        data
    })
}


export const getBaseMenuTree = () => {
    return service({
        url: '/menu/getBaseMenuTree',
        method: 'post'
    })
}

export const deleteMenu = (params) => {
    return service({
        url: `/menu/delete/${params}`,
        method: 'delete',
    })
}


export const updateMenu = (data) => {
    return service({
        url: '/menu/edit',
        method: 'put',
        data
    })
}

export const setRoleDataAuth = (data) => {
    return service({
        url: '/roles/setDataAuth',
        method: 'put',
        data
    })

}
